/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.domain;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.comac.ins.isfd.constant.MongoDataConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;


/**
 * 自然网格模型对比任务实体类
 *
 * @author lj
 * @date 2025-01-13
 */
@Data
@CollectionName(value = MongoDataConstant.MESH_COMPARE_TASK_TABLE_NAME)
public class IsfdMeshCompareTask {

    /**
     * 任务创建时间
     */
    @CollectionField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date createTime;

    /**
     * 对比类型
     */
    @CollectionField("type")
    @NotBlank(message = "type不能为空!")
    private String type;

    /**
     * 对比文件
     */
    @CollectionField("compared_object")
    @NotNull(message = "comparedObject不能为空!")
    private IsfdMeshCompareObject comparedObject;

    /**
     * 参照文件
     */
    @CollectionField("referenced_object")
    @NotNull(message = "referencedOject不能为空!")
    private IsfdMeshCompareObject referencedObject;

    /**
     * 任务状态
     */
    @CollectionField("status")
    private String status;

    /**
     * 失败原因
     */
    @CollectionField("message")
    private String message;
}
